<?php

class forumPostTable extends Doctrine_Table
{
	public function getPosts($topicId){
	
		$Query = Doctrine_Query::create()
			  ->from('forumPost fp')
			  ->innerJoin('fp.sfGuardUser u')
			  ->where('fp.topicId = ?', $topicId);
		  
		  return $Query->execute();
	}
}